home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++,comp.lang.eiffel,comp.lang.c,comp.object,comp.software-eng
- Path: in2.uu.net!world!tej
- From: tej@world.std.com (Thomas E Janzen)
- Subject: Re: Portability of code & skills (Beware of "C" Hackers etc)
- Message-ID: <DooBwC.8C0@world.std.com>
- Followup-To: <grp@dmu.ac.uk>
- Summary: I think C does some of these things you said it didn't
- Sender: tej@world.std.com
- Organization: The World Public Access UNIX, Brookline, MA
- References: <31494D29.4D4B@dmu.ac.uk> <DoG3HE.48E@assip.csasyd.oz> <31517E6F.5930@dmu.ac.uk>
- Date: Fri, 22 Mar 1996 14:50:36 GMT
-
- Well, I don't Really wish to defend C very much, but I think some of these
- assertions are wrong:
-
- In article <31517E6F.5930@dmu.ac.uk>, Graham Perkins <grp@dmu.ac.uk> wrote:
- >Don Harrison wrote:
- >confuse the two. For example, local functions give a certain power,
- >expecially if you can pass them as parameter as in Pascal. This power
-
- I don't remember enough Pascal to know what you mean. I know you could
- define a function inside a function, making Pascal block-structured.
- C can't do that, but of course you can pass functions as arguments of
- functions.
-
- >C does not even check
- >you pass the same number of print items as you specify, never mind give
-
- Of course it does. If I use gcc 2.6.94-q4 with -Wall -ansi
- with a line of C that says printf("hi %d %d\n", 5);
- I get: p.c:16: warning: too few arguments for format
-
- >No assertions
- I know it's dumb but what's wrong with assert() from assert.h?
-
- >concurrency, or
-
- True, you need to go to system calls for that, but that keeps changing;
- it is probably good that the language didn't tie us down to a particular
- paradigm; that's why it's missing from C++ also.
-
- > No built in string, vector, matrix, or complex operations.
- Basically, I'd say C is a language with an internationally defined library,
- and that library has string operations. The fact is, if you do a string
- operation in Pascal, you really are merely invoking a library call,
- on the VMS compiler I remember.
-
- >No opaque types
- a pointer to an empty struct declaration works fine.
- The header has the empty struct declaration for the client to see and
- the implementation module has the full struct definition and service
- functions.
-
- >Think of any powerful
- >construct you like from any language and you will find it NOT in C (or
- >at least not during the period C was catching on).
-
- If you're going to compare Ada 95 to C '72, what's the point?
-
-
- --
- Tom Janzen - tej@world.std.com USA Distributed Real-Time Data Acquisition S/W
- for Scientists and Engineers using POSIX, C, C++, X, Motif, Graphics, Audio
- http://world.std.com/~tej
-
-